package com.zyht.bank.wechat.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.wx.entity.SysWebArticle;
import com.wx.service.ArticlemsgService;
import com.zyht.common.AbsPrintBaseController;

@Controller
@RequestMapping("anon/question")
public class AxdQuestionController extends AbsPrintBaseController{
	
	@Resource
	private ArticlemsgService articleService;
	
	@RequestMapping(value="list")
	public String list(
			Model model){
		//String wxid=getWxid();
		//LoginCookie cookie= getLoginCookie();
		//String actorNo = cookie.getActorNo();
		List<SysWebArticle>list = articleService.list();
		if(list.size()>0){
			SysWebArticle bean = list.get(0);
			model.addAttribute("bean", bean);
		}
		else{
			model.addAttribute("bean","文章不存在");
		}
		return "banks/wechat/question/detail";
	}
	

}
